package com.yumeko.springcloud.Config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: SpringCloud
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-10 21:17
 */
@Configuration
public class GatewayConfig {
/*    @Bean
    public RouteLocator routes(RouteLocatorBuilder builder) {
        return builder.routes()
                .route("payment_route_baidu", r -> r.path("/guonei")
                        .uri("https://news.baidu.com"))
                .build();
    }
    @Bean
    public RouteLocator routes1(RouteLocatorBuilder builder) {
        return builder.routes()
                .route("payment_route1", r -> r.path("/tPayment/selectOne1/**")
                        .uri("lb://CLOUD-PROVIDER-SERVICE"))
                .build();
    }*/
}
